unit PacocUI;

interface

uses
  Graphics;

procedure ClearDebug;
procedure Writeln(s : string);
procedure ShowMessage(Msg: String);
procedure DisplayDebugImgWindow(Width, Height: Integer);
function  GetDebugCanvas: TCanvas;

implementation

uses
  ClickIt, DebugForm, Windows;

procedure ClearDebug;
begin
  ClickIt.MainForm.DebugMemo.Clear;
end;

procedure Writeln(s : string);
begin
  ClickIt.MainForm.DebugMemo.Lines.Add(s);
end;

procedure ShowMessage(Msg: String);
begin
  MessageBox(ClickIt.MainForm.Handle, PChar(Msg), 'PACOC', MB_OK);
end;

procedure DisplayDebugImgWindow(Width, Height: Integer);
begin
  frmDebug.Width:= Width;
  frmDebug.Height:= Height;
  frmDebug.Show;
end;

function GetDebugCanvas: TCanvas;
begin
  Result:= frmDebug.imgDebug.Canvas;
end;

end.
 